<script type="text/javascript">
	Yutil.useLoadingMessage();
	Yutil.en.enhance();
</script>

<div style = "font-size: 10pt;">
	<ul>
		<li>
			All the fields that needs to be checked should have a name in case the duplicate error prompt. 
			Try to click "save" button several times, you'll see this on "Name" field.
		</li>
		<li>
			The submit button or link should be enclosed in the tag which has a "form" class.
		</li>
		<li>
			All the fields are required.
		</li>
		<li>
			Age should be non-negative and an integer.
		</li>
		<li>
			Date of birth should be a date. You can view the correct format by clicking the calendar icon to choose one date. 
		</li>
		<li>
			Email should be in xxxx@xxx.xxx format.
		</li>
		<li>
			Phone should comprise of numbers, no other character.
		</li>
		<li>
			Address should be 50 characters at most.
		</li>
	</ul>
</div>

<br />
<hr />
<br />

<div fitHeight = "auto" style = "font-size: 10pt;">
	<table class = "form">
		<tr>
			<th>
				<label>Name</label>
			</th>
			<td>
				<input type = "text" class = "required"></input>
			</td>
		</tr>

		<tr>
			<th>
				<label>Age</label>
			</th>
			<td>
				<input name = "age" type = "text" class = "required positive0 integer" />
		</tr>

		<tr>
			<th>
				<label>Date of Birth</label>
			</th>
			<td>
				<input name = "birthday" type = "text" class = "required date" />
			</td>
		</tr>

		<tr>
			<th>
				<label>email</label>
			</th>
			<td>
				<input name = "email" type = "text" class = "required email" />
			</td>
		</tr>

		<tr>
			<th>
				<label>Phone</label>
			</th>
			<td>
				<input name = "phone" type = "text" class = "required number" />
			</td>
		</tr>

		<tr>
			<th>
				<label>Address</label>
			</th>
			<td>
				<textarea name = "address" rows="5" cols="10" maxlength = "50" class = "required textareastyle" style = "width: 20em; height: 4em;"></textarea>
			</td>
		</tr>

		<tr class="controls">
			<td>
		  		<%= JspWidget.$.actionButton("Save","form_sample_test.jsp", null,"demo_content") %> 
		  		<%= JspWidget.$.actionButtonSubmit("Validate","form_sample.jsp", null,"demo_content") %> 
			</td>
			<td>
			  	<%= JspWidget.$.actionButton("Cancel","form_sample.jsp", null,"demo_content") %>
			</td>
		</tr>
	</table>
</div>


<%@ page contentType="text/html;charset=UTF-8" buffer="none" %>
<%@ page import = "nju.*" %>